package com.dxy.yesas2020goals.study.partone.disignpattern.factorypattern.payment;

/**
 * @author victorydeng
 * @Classname PayFactory
 * @Description TODO
 * @Date 2020/2/25 16:23
 * @Created by victorydeng
 */
public class PayFactory {

  PayType pay(Class<? extends PayType> clazz) {
    try {
      if (clazz != null) {
        return clazz.newInstance();
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
    return null;

  }

}
